<template>
	<view class="content">
		<headBar :toTitle="'订单详情'"></headBar>
		<view style="position: fixed;top:0;background: #F4F5F9;z-index: -2;width:100%;height:100vh;"></view>
		<image class="bg-img" src="@/static/bgx.png"></image>

		<div style="height: 12px;"></div>
		<div class="baseCon">
			<div class="zflex">
				<image class="oilImg" src="/static/images/oilImg.png"></image>
				<div style="width: calc(100% - 60px);">
					<div class="zflex">
						<div style="font-size: 15px;font-weight: bold;margin-right: auto;">{{form.oilName}}</div>
						<div style="font-size: 15px;color: #ff6c1e;font-weight: 500;">¥{{form.actualPayment}}</div>
					</div>
					<div><span class="oil-tl">价格：</span><span class="oil-tr">¥{{form.discountPrice}}</span></div>
					<div><span class="oil-tl">数量：</span><span class="oil-tr">约{{form.refueleQuantity}}L/kg</span></div>
				</div>
			</div>

			<div class="zline"></div>
			<div class="same-w" style="margin-top: 6px;">
				<div class="detail-lef">实付款</div>
				<div class="detail-rig">{{form.actualPayment}}</div>
			</div>
			<div class="same-w" style="margin-top: 6px;">
				<div class="detail-lef">订单编号</div>
				<div class="detail-rig">{{form.orderNo}}</div>
			</div>
			<div class="same-w" style="margin-top: 6px;">
				<div class="detail-lef">下单时间</div>
				<div class="detail-rig">{{form.gmtCreate}}</div>
			</div>
			<div class="same-w" style="margin-top: 6px;">
				<div class="detail-lef">支付时间</div>
				<div class="detail-rig">{{form.payDate}}</div>
			</div>
			<div class="same-w" style="margin-top: 6px;">
				<div class="detail-lef">支付方式</div>
				<div class="detail-rig">{{form.useDate}}</div>
			</div>
		</div>

		<div style="padding:24px 16px;">
			<view class="bottombtn" style="width: 100%;border-radius: 22px;" @click="btnHexiao">
				确认核销</view>
		</div>


	</view>
</template>

<script>
	// #ifdef MP-WEIXIN
	import headBar from '@/components/headerBar/headBar.vue'
	// #endif
	// #ifdef H5
	import headBar from '@/components/headerBar/kongbai.vue'
	// #endif
	import {
		detailsMerchant,
		confirmVerification,
	} from '@/request/api.js'
	export default {
		components: {
			headBar
		},
		data() {
			return {
				eId: null,
				form: {},
			}
		},
		mounted() {
			//this.open()
		},
		onShow() {

		},
		onLoad(e) {
			this.eId = e.id
			this.getDetail()
		},
		methods: {

			goPage(row) {
				uni.navigateTo({
					url: row,
				})
			},

			btnHexiao() {
				confirmVerification({
					id: this.eId
				}).then(res => {
					uni.$u.toast('核销成功')
					setTimeout(() => {
						uni.navigateBack()
					}, 800)
				})
			},

			getDetail() {
				detailsMerchant(this.eId).then(res => {
					this.form = res.data
				})
			},

		}
	}
</script>

<style scoped>

</style>